<!DOCTYPE html>
<html>
<head>
  <title>Go Betweeners</title>
  <link rel="stylesheet" type="text/css" href="application.css" />
  <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "jquery", "application" %>
<%#= javascript_include_tag :defaults %>
  <%= csrf_meta_tags %>
  

</head>
<body>
<% flash[:notice] %>
 <% currentPosition = request.env['PATH_INFO'] %>
<div id="layout">
  <div id="header">
    <div class="heart"><%= image_tag "images/heart_2.gif" %></div>
	<% if session[:user_id] %>
    <div class="form_container">
	
      <h2>Intimate Search</h2>
      <%= form_for :search , :url => {:action => "search" } do |f|%>
        <fieldset>
        <div class="search_row">
          <div class="search_column_1">
            <%= f.label 'Height' %>
          </div>
          <div class="search_column_2">
            <%= f.number_field :minheight, :min => 0 %>
            <%= f.number_field :maxheight%>
          </div>
        </div>
		
        <div class="search_row">
          <div class="search_column_1">
            <%= f.label 'Max children' %>
          </div>
          <div class="search_column_2">
		  <%= f.hidden_field :minchildren , :value => 0 %>
            <%= f.number_field :maxchildren, :min => 0 %>
			
			</div>
		</div>
		<div class="search_row">
			<div class="search_column_1">
            <%= f.label :religion %>
			</div>
			<div class="search_column_2">
            <%= f.select :religion, [['Indifferent','Indifferent'],['Atheist','Atheist'],['Agnostic','Agnostic'],['Catholic','Catholic'],['Protestant','Protestant'],['Orthodox','Orthodox'],['Jewish','Jewish'],['Sunni islamic','Sunni islamic'],['Shia islamic','Shia islamic'],['Hindu','Hindu'],['Chinese','Chinese'],['Buddhist','Buddhist'],['Other','Other']] %>
			
          </div>
        </div>
        <div class="search_row">
          <div class="search_column_1">
		  <%= f.label :morphology %>
			
			</div>
		  
          <div class="search_column_2">
		  <%= f.select :morphology, [['Indifferent','Indifferent'],['Thin','Thin'],['Normal','Normal'],['Sportive','Sportive'],['Generous','Generous'],['Large','Large']] %>
		  </div>
		  </div>
		  <div class="search_row">
		  <div class="search_column_1">
		  <%= f.label 'Astro match' %>
		  
		  </div>
		  <div class="search_column_2">
		  <%= f.check_box :astrological %>
		  
          </div>
		  </div>
		  <div class="search_row last">
		  <div class="search_column_1">
		  <%= f.label 'City match' %>
		  
		  
		  </div>
		  <div class="search_column_2">
		   <%= f.check_box :city %>
		 <%= f.submit '', :class => "x" %>
			<% end %>
          </div>
		  </div>
        </fieldset>
      </form>
    </div>
	<% else %>
	<div class="form_container">
	
      <h2>Intimate Search</h2>
      <form action="http://www.free-css.com/" method="get">
        <div class="search_row">
         <div class="search_column_2">
            <label>Please log in to make a search</label>
          </div>
		</div>
      </form>
    </div>
	<% end %>
    <div class="banner"><%= image_tag "images/pic_1.gif" %></div>
    <div id="menu">
      <ul>
	 
        <%if session[:user_id] %>
	
		<li class="first"> <%if currentPosition == "/" %> <a class="current" href="/" > <% else %>  <a href = "/"><% end %><span>Home</span></a></li>
		<li > <%if currentPosition == "/account" %> <a class="current" href="/account" ><% else %>  <a href="/account" > <% end %><span>Account</span></a></li>
		<li> <%if currentPosition == "/meetingroom" %>  <a class="current" href="/meetingroom" ><% else %> <a href="/meetingroom" > <% end %> <span>Meeting Room</span></a></li>
		<li><% if currentPosition == "/infos" %> <a class="current" href = "/infos"><% else %> <a href = "/infos"><%end%> <span>Informations</span></a></li>
		<li> <% if currentPosition == "/private_message/inbox" || currentPosition.include?("message")%> <a class="current" href = "/private_message/inbox"><% else %> <a href = "/private_message/inbox"><%end%> <span>Inbox</span></a></li>
		<li> <%if currentPosition == "/logout" %>  <a class="current"href="/logout"><% else %> <a href="/logout"> <% end %> <span>Sign out</span></a></li>
		<% if admin? %>
		<li> <%if currentPosition == "/users" %>  <a class="current"href="/users"><% else %> <a href="/users"> <% end %> <span>Admin</span></a></li>
		<%end%>

	<% else %>
		<li class="first"> <%if currentPosition == "/" %>  <a class="current" href="/" ><% else %> <a href="/" ><% end %> <span>Home</span></a></li>
		<li> <%if currentPosition == "/register" %>  <a class="current" href="/register" ><% else %> <a href="/register" > <% end %><span>Sign up</span></a></li>
		<li> <%if currentPosition == "/login" %> <a class="current" href="/login"><% else %> <a href="/login"> <% end %><span>Log in</span></a></li>
	<% end %>
      </ul>
    </div>
  </div>
<%= yield %>
</body>
</html>
